package com.runchinaup.smartbelt.domian;

import java.io.Serializable;

public class BaseData implements Serializable {

    //计算校验码
    protected byte CountCheckCode(byte[] setValue) {
        int sum = 0;
        for (int i = 0; i < setValue.length; i++) {
            sum = sum + setValue[i];
        }
        int data = 0 - (sum % 256);
        byte back = (byte) data;
        return back;
    }

}
